using Jupiter.Infrastructure.Responses;
using Wips.AppService.Authorities.Organizations.Requests;
using Wips.AppService.Authorities.Organizations.Responses;
using Wips.AppService.CommonViewModels;

namespace Wips.AppService.Authorities.Organizations
{
    /// <summary>
    /// 
    /// </summary>
    public interface IOrganizationService
    {
        /// <summary>
        /// 读取分页列表
        /// </summary>
        /// <param name="request">请求类</param>
        /// <returns></returns>
        Task<PageResult<GetOrganizationPagesResponse>> GetPagesAsync(GetOrganizationPagesRequest request);


        /// <summary>
        /// 读取列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PageResult<GetOrganizationPagesResponse>> GetListAsync(
            GetOrganizationPagesRequest request);

        /// <summary>
        /// 读取树形数据
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<GetOrganizationTreeDataResponse>> GetTreeDataAsync(GetOrganizationTreeDataRequest request);

        /// <summary>
        /// 获取组织架构所有
        /// </summary>
        /// <returns></returns>
        Task<List<TreeSelectViewModel>> GetOrganizationListAsync();

        /// <summary>
        /// 读取树形选择框数据列表
        /// </summary>
        /// <returns></returns>
        Task<List<TreeSelectViewModel>> GetTreeSelectDataAsync();

        /// <summary>
        /// 读取信息
        /// </summary>
        /// <param name="id">Id</param>
        /// <returns></returns>
        Task<GetOrganizationByIdResponse> GetByIdAsync(string id);

        /// <summary>
        /// 获取组织架构级联人员信息
        /// </summary>
        /// <returns></returns>
        Task<List<CascaderSelectViewModel>> GetCascaderSelectDataAsync();


        /// <summary>
        /// 获取下属的组织架构人员树
        /// </summary>
        /// <returns></returns>
        Task<List<CascaderSelectViewModel>> GetSubordinateSelectDataAsync();

        #region 扩展信息

        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<GetOrganizationExtendByIdResponse> GetExtendByIdAsync(string id);

        #endregion
    }
}